import ajax from './index'

export function logistics_list(condition) {
    if(!condition) {
        condition = {
            pageNum: 1,
            pageSize: 10
        }
    }

    return ajax({
        url: "/backend/logistics/list",
        method: "get",
        params: condition
    });
}

export function logistics_all(condition) {
    return ajax({
        url: "/backend/logistics/listAll",
        method: "get",
        params: condition
    });
}

export function logistics_add(param) {
    return ajax({
        url: "/backend/logistics/create",
        method: "post",
        data: param
    });
}

export function logistics_edit(id, param) {
    return ajax({
        url: "/backend/logistics/update/" + id,
        method: "post",
        data: param
    });
}

export function logistics_del(id) {
    return ajax({
        url: "/backend/logistics/delete?ids=" + id,
        method: "post"
    });
}

export function logistics_detail(id) {
    return ajax({
        url: "/backend/logistics/detail/" + id,
        method: "get"
    });
}
